package com.wyr.proxyfactory.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Aspect
@Scope("prototype")
@Component
public class MyAspect {

    private int a=0;

    @Before("execution(* com.wyr.proxyfactory.service.*.test(..))")
    public void yourAdvice() {
        System.out.println(++a);
    }
}
